package com.atwy.account.mapper;

import com.atwy.account.model.AccountDo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface AccountMapper {

    @Select("select * from account_tbl where user_id = #{userId}")
    AccountDo getAccountByUserId(@Param("userId")String userId);

    @Update("update account_tbl set money = #{money},freeze_money = #{freezeMoney} where user_id = #{userId}")
    Integer updateAccount(AccountDo account);
}
